package day2.Test1;

public class Circle extends Shape{
    private double r;

    public Circle() {
    }

    public Circle(String name, double r) {
        super(name);
        this.r = r;
    }

    @Override
    public String toString() {
        return "Circle{" +
                "r=" + r +" "+super.toString()+
                '}';
    }

    @Override
    public double getArea() {
        double result = Math.PI*r*r;
        return result;
    }
}
